package main.controller;


/**
 * A class to help describe events that are passed around between Model, View,
 * and Controller. Since this is an event definition, it does lack a bit of
 * behavior.
 *
 * @author kevingao
 *
 */
public class MVCEvent {

    /**
     * List of possible event types.
     */
    public static enum EventType {
        /**
         * An error event.
         */
        ERROR
    }

    private final EventType myType;
    private final Object myMessage;

    /**
     * Default constructor.
     *
     * @param type the type of event it is
     * @param message the body of the event's message; type should be
     *        tied to event type
     */
    public MVCEvent (EventType type, Object message) {
        myType = type;
        myMessage = message;
    }

    /**
     * @return the myType
     */
    public EventType getType () {
        return myType;
    }

    /**
     * @return the myMessage
     */
    public Object getMessage () {
        return myMessage;
    }
}
